package db.entity;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the polyresult database table.
 * 
 */
@Embeddable
public class PolyResultPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String station;

	private String arm;

	private int padlife;

	private String padlotid;

    public PolyResultPK() {
    }
	public String getStation() {
		return this.station;
	}
	public void setStation(String station) {
		this.station = station;
	}
	public String getArm() {
		return this.arm;
	}
	public void setArm(String arm) {
		this.arm = arm;
	}
	public int getPadlife() {
		return this.padlife;
	}
	public void setPadlife(int padlife) {
		this.padlife = padlife;
	}
	public String getPadlotid() {
		return this.padlotid;
	}
	public void setPadlotid(String padlotid) {
		this.padlotid = padlotid;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PolyResultPK)) {
			return false;
		}
		PolyResultPK castOther = (PolyResultPK)other;
		return 
			this.station.equals(castOther.station)
			&& this.arm.equals(castOther.arm)
			&& (this.padlife == castOther.padlife)
			&& this.padlotid.equals(castOther.padlotid);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.station.hashCode();
		hash = hash * prime + this.arm.hashCode();
		hash = hash * prime + this.padlife;
		hash = hash * prime + this.padlotid.hashCode();
		
		return hash;
    }
}